package cn.ljy.uem.web.action.backstage.school;

import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import cn.ljy.common.model.result.ResponseData;
import cn.ljy.uem.model.SchoolTeachingTaskLessonMessageFile;
import cn.ljy.uem.model.query.SchoolTeachingTaskLessonMessageFileQuery;
import cn.ljy.uem.service.SchoolTeachingTaskLessonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;


/**
 * @description 教学任务课堂信息文件模块的业务层接口
 * @author 王秋林
 * @date 2022-11-30
 */
@Api(tags = "后台的教学任务课堂模块")
@RestController
@RequestMapping(value = "/api/backstage/school/schoolteachingtasklessonmessagefile")
public class SchoolTeachingTaskLessonMessageFileController extends BaseBackstageController<SchoolTeachingTaskLessonMessageFile, SchoolTeachingTaskLessonMessageFileQuery,String> {

    @Autowired
    private SchoolTeachingTaskLessonService baseService;

    @ApiOperation(value = "查询所有教学任务课堂信息文件")
    @GetMapping("/all")
    @Override
    protected ResponseData query(SchoolTeachingTaskLessonMessageFileQuery query) {
        return super.query(query);
    }

    @ApiOperation(value = "分页查询教学任务课堂信息文件列表")
    @Override
    public ResponseData query(Integer page, Integer pageSize, SchoolTeachingTaskLessonMessageFileQuery query){
        return super.query(page,pageSize,query);
    }

    @ApiOperation(value = "读取教学任务课堂信息文件")
    @Override
    protected ResponseData get(@PathVariable("id") String id) {
        return super.get(id);
    }

    @ApiOperation(value = "批量删除指定的多个教学任务课堂信息文件记录")
    @Override
    protected ResponseData deletes(@NotEmpty(message = "操作失败：请选择要移除的记录") String[] ids) {
        return super.deletes(ids);
    }


    @ApiOperation(value = "添加教学任务课堂信息文件")
    @Override
    protected ResponseData add(@Valid @RequestBody SchoolTeachingTaskLessonMessageFile schoolTeachingTaskLessonMessageFile) {
        return super.add(schoolTeachingTaskLessonMessageFile);
    }

    @ApiOperation(value = "编辑教学任务课堂信息文件")
    @Override
    protected ResponseData edit(@Valid @RequestBody SchoolTeachingTaskLessonMessageFile schoolTeachingTaskLessonMessageFile) {
        return super.edit(schoolTeachingTaskLessonMessageFile);
    }


}
